package com.chen.annotation;

import com.chen.constant.Constants;
import com.chen.enums.CounterType;

import java.lang.annotation.*;

/**
 * 访问接口，计数器+1
 *
 * @author chenyj
 */
@Inherited
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Counter {
    /**
     * 计数key前缀
     */
    String prefix() default Constants.COUNT_KEY;

    /**
     * 计数类型
     */
    CounterType type() default CounterType.DEFAULT;
}
